<template>
    <div class="page-container">
        <div ref="step1" :class="{'step1': true, 'highlighted-object': isGuide}">第一步</div>
        <div id="step1">第二步</div>
        <div id="step1">第三步</div>
        <div v-if="isGuide" id="cover-container">
            <div ref="cover" class="highlighted-cover">
                <div class="guide-tip-block" @click="hidden">我是引导</div>
            </div>
        </div>
    </div>
</template>

<script>
import CoverGuide from "./guide.js";

export default {
    data() {
        return {
            isGuide: true
        };
    },
    methods: {
        initGuide() {
            console.log("ddd", CoverGuide);
            this.isGuide = true;
            this.$nextTick(() => {
                CoverGuide.CoverGuide(this.$refs.cover, this.$refs.step1);
            })
        },
        hidden() {
            this.isGuide = false;
        }
    },
    mounted() {
        this.initGuide();
    },
};
</script>

<style scoped>
.guide-tip-block {
    position: absolute;
    color: white;
}

.step1 {
    width: 100px;
    height: 100px;
    background-color: blue;
}

.highlighted-object {
    position: relative;
    z-index: 1000;
}

.highlighted-cover {
    position: absolute;
    display: block;
    background-color: rgb(255, 255, 255);
    transition: all 0.25s ease-in-out;
    transform: scale(1.1);
}

@keyframes scale {

}

#cover-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}
</style>
